/** @file    wEntertainment.cpp
 *  @author  Alessandro Polo
 *  @version $Id: wEntertainment.cpp 2782 2010-07-20 04:16:42Z alex $
 *  @brief
 * The header for this class can be found in wEntertainment.h, check that file
 * for class description.
 ****************************************************************************/
/* Copyright (c) 2007-2010, WOSH - Wide Open Smart Home 
 * by Alessandro Polo - OpenSmartHome.com
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the OpenSmartHome.com WOSH nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY Alessandro Polo ''AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL Alessandro Polo BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 ****************************************************************************/

 #include "wEntertainment.h"

 #include "ui_wEntertainment_MediaTrack.h"

 #include <core/ObjectAllocator.h>
 #include <framework/gui/GuiUtilities.h>


using namespace std;
namespace wosh {
 namespace gui {

 WOSH_REGISTER(wosh::gui::wEntertainment_MediaTrack, "wosh::gui::IWidgetSerializable", 1.0, _static_wEntertainment_MediaTrack )
 WOSH_GUI_MAP(wosh::gui::wEntertainment_MediaTrack, "wosh::entertainment::MediaTrack", 0.0, _static_Map_wEntertainment_MediaTrack )

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

wEntertainment_MediaTrack::wEntertainment_MediaTrack( QWidget* parent )
	: QWidget(parent) {
	this->m_ui = new Ui::wEntertainment_MediaTrack();
	this->m_ui->setupUi(this);

	setWindowIcon( GuiUtilities::createIconFor( getSerializableType() ) );
	resize(260, 140);
 }

wEntertainment_MediaTrack::~wEntertainment_MediaTrack() {
	delete this->m_ui;
 }


WRESULT wEntertainment_MediaTrack::loadObject( const wosh::entertainment::MediaTrack* object ) {
	if ( object == NULL ) return WRET_OK;

	this->m_ui->wWidgetProperties->loadObject(NULL);

	return WRET_OK;
 }

WRESULT wEntertainment_MediaTrack::saveObject( wosh::entertainment::MediaTrack* object ) const {
	if ( object == NULL ) return WRET_ERR_PARAM;

	return WRET_OK;
 }

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////


 }; // namespace gui
}; // namespace wosh
